home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disc 3 / Commodore_Disc_03_19xx_-_de.d64 / textprogramm 64 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  8KB  |  233 lines

  1. 10 rem textverarbeitungsprogramm 64
  2. 20 rem (p) commodore welt         =
  3. 30 rem ============================
  4. 40 rem (c) by peter basch   7.0   =
  5. 50 rem (v) by bernd welte   2.0   =
  6. 60 rem                            =
  7. 70 rem version 2.0  40 z/ascii    =
  8. 80 rem commodore 64 + 1541        =
  9. 90 rem ============================
  10. 100 printchr$(014):p$=chr$(046):open1,4,2:open3,4,1:open4,4,7
  11. 110 dimz$(660),e$(61):cl$=chr$(147):cd$=chr$(017):rn$=chr$(018):rf$=chr$(146):rq$=chr$(145):rb$=chr$(157):sp$=chr$(032):ec$=chr$(027):in$=chr$(027)+chr$(064)
  12. 120 poke650,128
  13. 130 printcl$rn$"      [208]eter's  [212]ext fuer den [195]64'er     ";
  14. 140 printrn$"   < _ > zum [205]enue     < * > [204]eerzeile  "rf$;
  15. 150 print" mit [194]riefkopf =    <[194]> "
  16. 160 print"mit [193]bsenderzeile = <[193]>"
  17. 170 print" oder [206]eutral  =    <[206]>":print#1,in$;
  18. 180 gety$:ify$=""then180
  19. 190 ify$="n"then720
  20. 200 ify$="b"then350
  21. 210 ify$="a"then330
  22. 220 goto 180
  23. 230 y$="b"
  24. 240 print"[211]chrift ? < [208] > [208]ica     < [201] > [201]talic"
  25. 250 print"          < [203] > [203]ompr.   < [211] > [211]choen"
  26. 260 getb$:ifb$=""then260
  27. 270 ify$="b"andb$="k"thenprint"[203]eine komprimierte [211]chrift moeglich":goto260
  28. 280 ifb$="p" then return
  29. 290 ifb$="k" thenprint#1,ec$;chr$(15);:return
  30. 300 ifb$="i" thenprint#1,ec$;chr$(52);:return
  31. 310 ifb$="s" thenprint#1,ec$;chr$(88);chr$(1);:return
  32. 320 goto260
  33. 330 gosub240
  34. 340 print#1,spc(8)"[208]eter [194]asch":print#1,spc(8)"[198]aerberstr. 27";
  35. 345 print#1,spc(8)"8998 lindenberg":print#1,spc(8)"tel. 0838176573"
  36. 346 for i=1to4:print#1:nexti:goto730
  37. 350 print:printrn$" [193]dressen eingabe ":print
  38. 360 input"  [193]nrede          ";a$
  39. 370 input"  [212]itel           ";k$
  40. 380 input"  [206]ame            ";n$
  41. 390 input"  [211]trasse         ";c$
  42. 400 input"  [208][204][218]  [207]rt        ";d$
  43. 410 input"  [201]hr  [196]atum      ";e$
  44. 420 ife$=""thene$="          "
  45. 430 input"  uns. [218]eichen    ";f$
  46. 440 iff$=""thenf$="   "
  47. 450 input"  [196]atum           ";g$
  48. 460 input"  [193]nrede          ";h$
  49. 470 print#3,chr$(14)"========================================"
  50. 480 print#3,ec$;chr$(87);chr$(0);
  51. 490 print#3,ec$;chr$(80);
  52. 500 print#3,ec$;chr$(69);chr$(14)"peter basch                     dl1gbc"
  53. 510 print#3,ec$;chr$(70);
  54. 520 print#3,ec$;chr$(20)"faerberstr. 27";
  55. 530 print#3,ec$;chr$(15)spc(87)"amateurradiostation"
  56. 540 print#3,ec$;chr$(65);chr$(5)
  57. 550 print#3,ec$;chr$(45);chr$(1);
  58. 560 print#3,"8998 lindenberg"
  59. 570 print#3,ec$;chr$(45);chr$(0);
  60. 580 print#3,ec$;chr$(15);spc(111)"[207]rtsverband [204]indau/[194]":print#3
  61. 590 print#3,"tel. 08381/6573";
  62. 600 print#3,ec$;chr$(69)spc(57)"dok   t 13"
  63. 610 print#3,ec$;chr$(70)
  64. 620 print#3,ec$;chr$(83);chr$(1);
  65. 630 print#3,"bank krspk 7988 wangen blz 65052020 ktnr. 938866":print#3
  66. 640 print#3,ec$;chr$(84);
  67. 650 print#3,chr$(18);chr$(14)"========================================":print# 3,in$
  68. 660 fori=1to2:print#3,"":print#3,ec$;chr$(74);chr$(i);:nexti:print#4,in$;
  69. 670 gosub230
  70. 680 print#4,spc(8)a$:print#4,spc(8)k$:print#4,spc(8)n$:print#4,spc(8)c$:print#4,spc(8)d$:fori=1to3:print#4:nexti
  71. 690 fori=1to80:print#1,chr$(45);:nexti
  72. 700 print#1,ec$;chr$(77);" [201]hr [211]chreiben vom: ";e$;"   unser [218]eichen  ";f$;"           [196]atum :";g$
  73. 710 print#1:print#1:print#1:print#4,spc(8)h$:print#4,ec$;chr$(70):goto2020
  74. 720 gosub240
  75. 730 goto 2020
  76. 740 printchr$(175)+rb$;
  77. 750 gett$:ift$=""then750
  78. 760 t=asc(t$):ift=20andw=1andz<=1andlen(tt$)=0thent$="":printcl$;:z=1:goto740
  79. 770 ifw=2andt=20andlen(tt$)=0thent$="":goto750
  80. 780 ift>13andt<20ort>20andt<32ort>128andt<133ort>144andt<160thent$="":goto750
  81. 790 ift=95thenreturn
  82. 800 ift=42thentt=66:z$(z)=tt$:z=z+1:tt$="":print"[218]eile "z-1:goto740
  83. 810 ift=13then740
  84. 820 ift=34thent$="'"
  85. 830 ift<>20andlen(t$)=1thenprintt$;
  86. 840 ift<>20goto940
  87. 850 iflen(tt$)=1then880
  88. 860 ifw=1then870
  89. 870 tt$=left$(tt$,len(tt$)-1):printchr$(20);:goto740
  90. 880 l=l-len(tt$):tt$="":printsp$rb$chr$(20);:ifw=1thenz$(z)="":z=z-1:ifz=0thenz=1
  91. 890 ifw=1thentt$=z$(z)
  92. 900 ifw=0thene=e-1:ife=0thene=1
  93. 910 ifw=0thentt$=e$(e)
  94. 920 ifw=2thentt$="":goto750
  95. 930 return
  96. 940 iflen(t$)>1then1000
  97. 950 ifq=0andlen(tt$)>u-3andt$=" "then990
  98. 960 tt$=tt$+t$
  99. 970 iflen(tt$)>54thengosub2180
  100. 980 iflen(tt$)<u+2then740
  101. 990 goto930
  102. 1000 xl=len(t$):fors=1toxl:tr$=mid$(t$,s,1):tt$=tt$+tr$:printtr$;:lk=len(tt$)
  103. 1010 iflk>u+1thent$="":goto950
  104. 1020 next:t$="":goto950
  105. 1030 w=1:print:printcl$"[215]eiterschreiben ";rn$" (1) "rf$
  106. 1040 print"[206]euen [212]ext eing.";rn$" (2) "rf$
  107. 1050 getx$:x=val(x$):ifx<1orx>2then1050
  108. 1060 onxgoto1070,1190
  109. 1070 printcl$rq$;
  110. 1080 fori=1to66:printrn$p$;:next:print"<[218]eilenende"
  111. 1090 z$(z)=tt$:z=z+1:tt$="":gosub740
  112. 1100 ift$=chr$(95)thenz$(z)=tt$:tt$="":t$="":w=0:return
  113. 1110 goto1090
  114. 1120 printcl$rq$;
  115. 1130 fori=1to66:printrn$p$;:next:print"<[218]eilenende"
  116. 1140 forx=1toz:z$(z)="":z=1:gosub740
  117. 1150 ift$=chr$(95)thenz$(z)=tt$:tt$="":t$="":w=0:return
  118. 1160 z$(z)=tt$:z=z+1:tt$="":print"    [218]eile ";z-1:gosub740
  119. 1170 ift$=chr$(95)thenz$(z)=tt$:tt$="":t$="":w=0:return
  120. 1180 goto1160
  121. 1190 u=64:goto1120
  122. 1200 a=1:b=8
  123. 1210 printcl$:c=b-a:forx=atob:printrn$;x;rb$" "rf$;tab(6);z$(x):next:printcd$
  124. 1220 poke781,21:poke782,0:poke783,0:sys65520
  125. 1230 printrn$"  (l)    [204]oeschen   (e) [197]infuegen       ";
  126. 1240 print"  (+ - ) [194]laettern  (b) [194]locktausch     ";
  127. 1250 print"  (_) [197]nde                              ";
  128. 1260 getk$:ifk$=""then1260
  129. 1270 ifk$="l"then1360
  130. 1280 ifk$="e"then1390
  131. 1290 ifk$="b"then1520
  132. 1300 ifk$="-"thena=a-1-c:b=a+c:ifa<1thena=1:b=a+c
  133. 1310 ifk$="-"then1210
  134. 1320 ifk$="+"thena=b+1:b=b+1+c:ifb+1+c>660thenb=660:a=b-c
  135. 1330 ifk$="+"then1210
  136. 1340 ifk$=chr$(95)thena=0:b=0:return
  137. 1350 goto1210
  138. 1360 printcd$"[215]elche [218]eile soll geloescht werden?      0=[201]rrtum ";:input" [218]eilen-[206]r. ";kk:ifkk=0then1210
  139. 1370 ifkk>zthenprintrq$rq$rq$rq$rq$rq$rq$:goto1360
  140. 1380 forx=kktoz:z$(x)=z$(x+1):next:z$(z)="":z=z-1:kk=0:goto1210
  141. 1390 printcd$"[214]or welcher [218]eile soll eingefuegt werden? (0=[218]urueck) ";:input" [218]eilen-[206]r. ";kk:ifkk>zthenprintrq$rq$:goto1390
  142. 1400 ifkk=0then1210
  143. 1410 w=0:e=0:printcl$"[197]s koennen maximal 60 [218]eichen eingefuegt werden!"
  144. 1420 forx=1to660:next:printcl$:e=1:ifz+1>=660then1210
  145. 1430 gosub740:ift$=chr$(95)thene$(e)=tt$:tt$="":t$="":goto1490
  146. 1440 e$(e)=tt$:tt$="":t$="":e=e+1:ife=61then1490
  147. 1450 ifz+e=660goto1490
  148. 1460 gosub740
  149. 1470 ift$=chr$(95)thene$(e)=tt$:tt$="":t$="":goto1490
  150. 1480 goto1440
  151. 1490 z=z+e:forx=ztokk+e-1step-1:z$(x)=z$(x-e):next
  152. 1500 f=0:forx=kktokk+e-1:f=f+1:z$(x)=e$(f):e$(f)="":next:kk=0:e=1
  153. 1510 goto1210
  154. 1520 printcd$"[214]on welcher [218]eile ";:input"[218]eilen-[206]r. ";aa$:ifaa$=chr$(95)then1210
  155. 1530 aa=val(aa$):ifaa<1orab>zthenprintrq$rq$:goto1520
  156. 1540 print"bis zu welcher [218]eile ";:input"[218]eilen-[206]r. ";bb:ifbb<aaorbb>zthenprintrq$rq$:goto1540
  157. 1550 print"[214]or welcher [218]eile soll eingefuegt werden ?";:input"[218]eilen-[206]r. ";cc:ifcc<1orcc>zthenprintrq$rq$:goto1550
  158. 1560 dd=bb+1-aa:ifdd>60thenprint"[194]lock zu gross":goto1210
  159. 1570 e=0:e$="":ford=aatobb:e=e+1:e$(e)=z$(d):next
  160. 1580 z=z+dd+1:ford=ztocc+dd-1step-1:z$(d)=z$(d-dd):next:d=0:e=0
  161. 1590 ford=cctocc+dd-1:e=e+1:z$(d)=e$(e):next:x=0
  162. 1600 print"[194]lock 1 loeschen ";rn$" j/n ? "
  163. 1610 getx$:ifx$=""then1610
  164. 1620 ifx$="j"then1650
  165. 1630 ifx$="n"then1210
  166. 1640 goto1610
  167. 1650 forx=aatoz:z$(x)=z$(x+dd):next:z=z-dd:goto1200
  168. 1660 printcl$rn$" [193]usdruck "
  169. 1670 gosub1780
  170. 1680 xx=0
  171. 1690 forx=atob:print#1,chr$(9);:gosub1760:ma=ma+1:ifma/t=int(ma/t)thenxx=xx+1
  172. 1700 next
  173. 1710 print"[206]och ein [196]ruck? (j/n) ":printrq$rq$:xx=0:ma=0
  174. 1720 gety$:ify$=""then1720
  175. 1730 ify$="j"thenprintrq$rq$:ma=0:goto1670
  176. 1740 ify$="n"thenx$="":y$="":q=0:return
  177. 1750 goto1720
  178. 1760 forzz=1tolen(z$(x)):ip$=mid$(z$(x),zz,1)
  179. 1770 print#4,ip$;:nextzz:print#4:return
  180. 1780 t=60:p=8:a$="0"
  181. 1790 a$="0":a=val(a$):ifa=0thena=1:b=z:goto1810
  182. 1800 ifa<0ora>zthenprintrq$rq$rq$:goto1790
  183. 1810 return
  184. 1820 printcl$:open15,8,15
  185. 1830 print#15,"i0":gosub1950:input"[196]ateiname:";cb$:db$="0:"+cb$+",s,w"
  186. 1840 goto1970
  187. 1850 open2,8,2,db$:print"[196]atei ";rn$ cb$ rf$;" wird gespeichert."
  188. 1860 print#2,z:print#2,u:forx=1toz:ifz$(x)=""thenz$(x)=chr$(95)
  189. 1870 print#2,chr$(34);z$(x):ifz$(x)=chr$(95)thenz$(x)=""
  190. 1880 next:close2:close15:return
  191. 1890 printcl$:open15,8,15:print#15,"i0"
  192. 1900 gosub1950:input"[196]ateiname: ";cb$:db$="0:"+cb$+",s,r"
  193. 1910 gosub1950:close2:open2,8,2,db$:gosub1950:printcd$"[196]atei ";rn$cb$rf$;" wird eingelesen."
  194. 1920 input#2,z:input#2,u:forx=1toz
  195. 1930 input#2,z$(x):ifz$(x)=chr$(95)thenz$(x)=""
  196. 1940 next:close2:close15:return
  197. 1950 input#15,v$,w$,x$,y$:ifval(v$)<>0thenprintv$,w$,x$,y$
  198. 1960 return
  199. 1970 open2,8,2,db$:gosub1950:ifval(v$)<>63thenclose2:print#15,"s0:"+cb$:goto1850
  200. 1980 ifval(v$)=63thenprint"[196]atei ueberschreiben ";rn$" j/n ? "
  201. 1990 getz$:ifz$=""then1990
  202. 2000 ifz$="n"thenclose2:close15:goto1820
  203. 2010 ifz$="j"thenclose2:print#15,"s0:"+cb$:gosub1950:goto1850
  204. 2020 x$="":x=0:q=0:w=0:printcl$chr$(14)
  205. 2030 printcd$cd$spc(14)rn$" [205] e n u e ":print
  206. 2040 printspc(8)rn$"-1-";rf$" [212]ext eingeben":print
  207. 2050 printspc(8)rn$"-2-";rf$" [212]ext korrigieren":print
  208. 2060 printspc(8)rn$"-3-";rf$" [212]ext drucken":print
  209. 2070 printspc(8)rn$"-4-";rf$" [212]ext speichern":print
  210. 2080 printspc(8)rn$"-5-";rf$" [212]ext einlesen":print
  211. 2090 printspc(8)rn$"-6-";rf$" [208]rogrammende":print
  212. 2100 printspc(8)rn$"-7-";rf$" [218]urueck":print
  213. 2110 printspc(8)"[215]aehlen [211]ie ";rn$" 1-7 ":print
  214. 2120 print:printspc(5)"[198]reier [211]peicher =";:printfre(0)"[194]ytes"
  215. 2130 getx$:x=val(x$):ifx<1orx>7then2130
  216. 2140 ifx=6thenprintchr$(19);chr$(19);cl$:close1:close3:close4:end
  217. 2150 ifx=7 goto 130
  218. 2160 onxgosub1030,1200,1660,1820,1890
  219. 2170 goto2020
  220. 2180 si=54272:fl=si:fh=si+1:w=si+4:a=si+5:h=si+6:l=si+24
  221. 2190 pokel,15:pokea,16+9:pokeh,4*16+4:pokefh,29:pokefl,69
  222. 2200 pokew,17:fort=1to100:next
  223. 2210 pokew,0:pokea,0:pokeh,0
  224. 2220 return
  225. 2230 rem textprogramm ========= c64
  226. 2240 rem 038911 bytes memory    ===
  227. 2250 rem 007548 bytes program   ===
  228. 2260 rem 000112 bytes variables ===
  229. 2270 rem 002183 bytes arrays    ===
  230. 2280 rem 000040 bytes strings   ===
  231. 2290 rem 029028 bytes free (0)  ===
  232. 2300 rem ==========================
  233.